<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>千途智能在线修图 摄影服务的综合平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content=千途，千途修图，智能修图，一键修图，在线修图，后期修图>
    <meta name="description" content=千途智能一键修图  汇聚图像处理技术打造高质量后期修图摄影服务的综合平台>
    <link rel="stylesheet" href="/static/web/res/layui/css/layui.css">
    <link rel="stylesheet" href="/static/web/res/css/reset.css">
    <link rel="stylesheet" href="/static/web/res/css/common.css">
    <link rel="stylesheet" href="/static/web/manual-retouching/css/manual-retouching.css">
    <script src="/static/web/res/js/jquery.min.js"></script>
    <script src="/static/web/res/layui/layui.js"></script>
    <script src="/static/web/manual-retouching/js/manual-retouching.js"></script>
    <script src="/static/web/res/js/jquery.lwtCountdown-1.0.js"></script>
    <script src="/static/web/res/js/js.js"></script>
</head>
<body>
<div class="header">
    <div class="wrap">
        <a class="logo" href="/"></a>
        <ul class="nav clearfix">
            <li><a href="/"><p class="chn">首页</p>
                    <p class="eng">HOME</p></a></li>
            <li class="active"><a href="/web/ps"><p class="chn">修图</p>
                    <p class="eng">RETOUCH</p></a></li>
            <li><a href="/web/match/matchList"><p class="chn">比赛</p>
                    <p class="eng">MATCH</p></a></li>
            <li >
                <a href="javascript:"><p class="chn">发布</p><p class="eng">EXPLORE</p><i class="arrow"></i></a>
                <div class="sub">
                    <a class="sub-item" href="http://www.pai2345.com/web/Findworks/addShoot">发布摄影作品</a>
                    <a class="sub-item" href="http://www.pai2345.com/web/Findworks/addTravels">发布游记</a>
                    <a class="sub-item" href="http://www.pai2345.com/web/Findworks/index" onclick="sessionStorage.setItem('initType',3);">已发布管理</a>
                    <a class="sub-item" href="http://www.pai2345.com/web/Findworks/draft" onclick="sessionStorage.setItem('initType',3);">未完成任务</a>
                </div>
            </li>
            <li><a href="http://edu.pai2345.com/"><p class="chn">云课堂</p><p class="eng">EDUCATION</p></a></li>
        </ul>
        <ul class="user-logwrap right">
                        <li class="user-logwrap-item clearfix">
                <a class="toreg" href="http://www.pai2345.com/web/user/register.html">注册</a><i class="icon-line">|</i>
                <a class="tologin" href="http://www.pai2345.com/web/user/login.html">登录</a>
            </li>
                    </ul>
            </div>
</div>

<script>
    //调用websocket
        //通知弹窗
    function  alyerNotify(content){
        if($('.j-socket-notify').length>0){
            $('.j-socket-notify:eq(0)').find('div.layui-layer-content').html(content);
        }else{
            layer.open({
                skin: 'dialog-tips dialog-tips2 j-socket-notify',
                type: 1,
                anim: 2,
                offset: 'rb',
                title: '通知',
                shade: 0,
                content:content,
            });
        }
    }
    $(document).on('click','.dialog-tips2 .btn-wrap a',function(){
        layer.closeAll();
    });
</script>
<div style="position: fixed;top: 10%;left: 0;z-index: 10;">
    <div id="match_img_box">
        <div style="position: absolute;width: 80px;height: 30px;right: 0;top: 10px;z-index: 99"
             onclick="$('#match_img_box').hide()"></div>
        <a href="/web/match/detail/id/159"><img src="/static/web/res/images/ai_img-1.png" alt=""></a>
    </div>
    <div style="margin-top: 12px;"><a class="btn-exch" href="javascript:void(0);"><img
                    src="/static/web/res/images/0926/aips-exchange.gif" alt=""></a></div>
</div>

<div class="content retouch">
    <div class="wrap wrap2">
                <div class="link-wrap">
            <a href="/web/ps/ai"><img src="/static/web/res/images/retouch-1.png" alt=千途修图></a>
            <a href="/web/ps/work2"><img src="/static/web/res/images/retouch-2.png" alt=千途修图></a>
        </div>
        <div class="ps-case layui-tab">
            <div class="hd">
                <p>千途修图样片欣赏</p>
                <ul class="layui-tab-title">
                    <li class="layui-this">自然景观</li>
					<li>纪实人文</li>
					<li>写真人像</li>
					<li>黑白影调</li>
					<li>航拍风光</li>
					<li>动物鸟类</li>
                </ul>
            </div>
            <div class="bd layui-tab-content">
                <div class="img-box-big">
                    <div class="img-before"></div>
                    <div class="img-after"></div>
                    <div class="line">
                        <span class="label-before">修图前</span>
                        <span class="label-after">修图后</span>
                    </div>
                </div>
                <div class="layui-tab-item layui-show">
                    <div class="img-box-small">
                        <img src="/static/web/res/images/pscase_after1.jpg" data-index="1" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after2.jpg" data-index="2" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after3.jpg" data-index="3" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after4.jpg" data-index="4" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after5.jpg" data-index="5" alt=千途修图>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="img-box-small">
                        <img src="/static/web/res/images/pscase_after6.jpg" data-index="6" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after7.jpg" data-index="7" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after8.jpg" data-index="8" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after9.jpg" data-index="9" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after10.jpg" data-index="10" alt=千途修图>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="img-box-small">
                        <img src="/static/web/res/images/pscase_after11.jpg" data-index="11" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after12.jpg" data-index="12" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after13.jpg" data-index="13" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after14.jpg" data-index="14" alt=千途修图>
                        <img src="/static/web/res/images/pscase_after15.jpg" data-index="15" alt=千途修图>
                    </div>
                </div>
                <div class="layui-tab-item">
					<div class="img-box-small">
						<img src="/static/web/res/images/pscase_after16.jpg" data-index="16" alt=千途修图>
						<img src="/static/web/res/images/pscase_after17.jpg" data-index="17" alt=千途修图>
						<img src="/static/web/res/images/pscase_after18.jpg" data-index="18" alt=千途修图>
						<img src="/static/web/res/images/pscase_after19.jpg" data-index="19" alt=千途修图>
						<img src="/static/web/res/images/pscase_after20.jpg" data-index="20" alt=千途修图>
					</div>
				</div>
				<div class="layui-tab-item">
					<div class="img-box-small">
						<img src="/static/web/res/images/pscase_after21.jpg" data-index="21" alt=千途修图>
						<img src="/static/web/res/images/pscase_after22.jpg" data-index="22" alt=千途修图>
						<img src="/static/web/res/images/pscase_after23.jpg" data-index="23" alt=千途修图>
						<img src="/static/web/res/images/pscase_after24.jpg" data-index="24" alt=千途修图>
						<img src="/static/web/res/images/pscase_after25.jpg" data-index="25" alt=千途修图>
					</div>
				</div>
				<div class="layui-tab-item">
					<div class="img-box-small">
						<img src="/static/web/res/images/pscase_after26.jpg" data-index="26" alt=千途修图>
						<img src="/static/web/res/images/pscase_after27.jpg" data-index="27" alt=千途修图>
						<img src="/static/web/res/images/pscase_after28.jpg" data-index="28" alt=千途修图>
						<img src="/static/web/res/images/pscase_after29.jpg" data-index="29" alt=千途修图>
						<img src="/static/web/res/images/pscase_after30.jpg" data-index="30" alt=千途修图>
					</div>
				</div>
            </div>
        </div>
        <div class="ps-box">
            <div class="title">千途一键修图</div>
            <div class="text">千途智能一键修图是领先全球的专家级在线修图系统，由国际多家影像研究机构共用研发，汇聚业内顶尖图像处理专家共同精心打造。</div>
            <a class="btn-tops" href="http://www.pai2345.com/web/ps/ai">我要修图</a>
        </div>
        <div class="ps-box">
            <div class="title">全球摄影师都在用的在线修图系统</div>
            <div class="ps-cla">
                <!--<div class="item">
                    <img src="/static/web/res/images/ps_cla1.jpg" alt=千途修图>
                    <p>风 光</p>
                </div>
                <div class="item">
                    <img src="/static/web/res/images/ps_cla2.jpg" alt=千途修图>
                    <p>人 像</p>
                </div>
                <div class="item">
                    <img src="/static/web/res/images/ps_cla3.jpg" alt=千途修图>
                    <p>人 文</p>
                </div>-->
                <img class="ps-cla-img" style="width: 985px;;height: 520px;" src="/static/web/res/images/ps-cla-img.png">
            </div>
            <div class="text" style="text-align: left;text-indent: 28px;">
                该系统使用人工智能技术，对千万摄影佳作的艺术效果进行智能学习，运用先进的图形算法对照片深度处理，无需下载和安装软件，登录千途网上传图片，即可一键制作高品质的艺术摄影作品！
            </div>
        </div>
        <div class="ps-box">
            <div class="title">千途智能一键修图全能核心技术</div>
            <div class="ps-tec">
                <div class="item">
                    <img src="/static/web/res/images/ps_tec1.png" alt=千途修图>
                    <p>无需下载，无需安装</p>
                </div>
                <div class="item">
                    <img src="/static/web/res/images/ps_tec2.png" alt=千途修图>
                    <p>专业快捷，一键修图</p>
                </div>
                <div class="item">
                    <img src="/static/web/res/images/ps_tec3.png" alt=千途修图>
                    <p>艺术效果，丰富多样</p>
                </div>
                <div class="item">
                    <img src="/static/web/res/images/ps_tec4.png" alt=千途修图>
                    <p>RAW精修，品质精良</p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--<div class="footer">-->
<!--<div class="wrap clearfix">-->
<!--<div class="left">-->
<!--<p class="strong">千途网</p>-->
<!--<p>千途网是一个为国内外专业摄影师、摄影爱好者提供摄影点位导摄、图片处理、交易、学习和分享交流的综合服务平台。</p>-->
<!--<p>-->
<!--<a href="http://www.pai2345.com/web/Index/aboutus">关于我们</a><span class="icon-line">|</span>-->
<!--<a href="">服务条款</a><span class="icon-line">|</span>-->
<!--<a href="http://www.pai2345.com/web/Index/contactus">联系我们</a>-->
<!--<span class="icp">闽ICP备14001401号-5</span>-->
<!--</p>-->
<!--</div>-->
<!--<div class="right clearfix">-->
<!--<div class="code">-->
<!--<img src="http://app.yqxsy.cn/static/web/match/images/qrcode1.jpg">-->
<!--<p>微信公众号</p>-->
<!--</div>-->
<!--<div class="code">-->
<!--<img src="http://app.yqxsy.cn/static/web/match/images/qrcode2.png">-->
<!--<p>APP下载</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<style>
    /*.all_wial{*/
    /*background:rgba(0,0,0,0.5);*/
    /*position: absolute;*/
    /*top: 0;*/
    /*left: 0;*/
    /*width: 100%;*/
    /*height: 100%;*/
    /*!*display: none;*!*/
    /*z-index: 10;*/
    /*}*/
    .all_wial {
        width: 700px;
        height: 450px;
        background: #fff;
        display: none;
    }

    .all_wial > div {
        padding: 0 40px;
        text-align: left;
    }

    .all_wial > .all_wial_title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 10px;
        margin-top: 25px;
    }

    .all_wial input {
        height: 30px;
        width: 287px;
        line-height: 287px;
        border: 1px solid #ddd;
        padding-left: 10px;
    }

    .all_wial button {
        width: 140px;
        height: 40px;
        background: #ef7f48;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
</style>
<div class="all_wial">
    <div class="all_wial_title">您遇到了什么问题？觉得千途Ai智能修图哪些地方不够好用？</div>
    <div>
        <textarea placeholder="详细描述您出错的情况或者建议，帮助我们快速定位原因并解决问题" class="all_wial_content"
                  style="width: 616px;height: 160px;border: 1px solid #ddd;"></textarea>
    </div>
    <div style="margin-top: 15px;margin-bottom: 12px;">
        <input type="text" placeholder="您的电话/手机：" style="margin-right: 17px;" class="all_wial_contact">
        <input type="text" placeholder="您的QQ邮箱" class="all_wial_email">
    </div>
    <div>
        留下您的联系方式以方便我们的工作人员能尽快联系到您解决问题
    </div>
    <div style="text-align: center;margin-top: 40px;    margin-bottom: 20px;">
        <button onclick="submitFeedback()">填写完成，提交</button>
    </div>
    <hr style="width: 90%;margin: 0 auto">
    <div style="text-align: center;font-size: 18px;font-weight: 700;margin-top: 22px;">
        问题紧急，您可以
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3298507498&site=qq&menu=yes" id="qqBox">
            <img border="0" width="100px" src="/static/web/res/images/counseling_style_52.png" alt="点击这里给我发消息"/>
        </a>
    </div>
</div>
<div class="footer">
    <div class="wrap clearfix">
        <div class="left">
            <p>千途导摄平台是一个集拍摄地导航、智能修图、摄影比赛、网络教学、网络存储、摄影旅游、图片分享销售、摄影学习互动于一体的综合性互联网摄影服务平台。</p>
            <p>
                <a href="http://www.pai2345.com/web/Index/aboutus">关于千途</a><span class="icon-line">|</span>
                <a href="http://edu.pai2345.com/">云课堂</a><span class="icon-line">|</span>
                <a href="http://www.pai2345.com/web/Index/help">使用指南</a><span class="icon-line">|</span>
                <a href="http://www.pai2345.com/web/Index/aips" target="_blank">一键修图</a><span class="icon-line">|</span>
                <a href="http://www.pai2345.com/web/Index/assistant">修图助手</a><span class="icon-line">|</span>
                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3298507498&site=qq&menu=yes">在线客服</a><span
                        class="icon-line">|</span>
                <a href="javascript:void (0);" onclick="feedback()">意见反馈</a><span class="icon-line">|</span>
                <a href="http://www.pai2345.com/web/Index/disclaimer">免责声明</a>
            </p>
            <p class="icp">©2019 福州全摄汇网络科技有限公司版权所有&emsp;<a target="_blank" href="http://www.beian.miit.gov.cn" style="display:inline-block;vertical-align: middle;"><img src="/static/web/res/images/beian-icon.png" style="float:left;"><span style="margin: 0px 0px 0px 5px;">闽ICP备19009816号-2</span></a>
            </p>
        </div>
        <div class="right clearfix">
            <div class="code">
                <img src="/static/web/res/images/code.png">
                <p>下载千途App<br>手机上查看与分享修图作品</p>
            </div>
        </div>
    </div>
</div>
<ul class="fixed-bar">
    <li class="gotop" style="display: none;">
        <a></a>
        <div class="subbox">
            <div>返回顶部</div>
        </div>
    </li>
    <li class="service">
        <a></a>
        <div class="subbox">
            <div class="t-1"><i></i>在线客服</div>
            <div>工作日：9:00 - 22:00</div>
            <div>节假日：9:00 - 18:00</div>
            <a class="btn-serv" target="_blank"
               href="http://wpa.qq.com/msgrd?v=3&uin=3298507498&site=qq&menu=yes">联系客服</a>
            <div class="t-2">
                <a href="/web/ps/qa" target="_blank"><i></i>常见问题&gt;&gt;</a>
            </div>
        </div>
    </li>
    <li class="download">
        <a></a>
        <div class="subbox">
            <div><img class="qrcode" src="/static/web/res/images/code.png"></div>
            <div>扫码立即下载千途App</div>
        </div>
    </li>
    <li class="video">
        <a>视频<br>教程</a>
        <div class="subbox" style="display: none;">
            <div class="item item-p on">
                <p>Ai修图<br>宣传片</p>
                <a class="pic" href="javascript:void(0)" data-src="http://bf.allimage.cn/330c31040c694e789a904feba912b5e4/8d7e6a97e6c24b6dacf175a22fc5efba-46d9c63fa8fc69968d8e2c47cc649a0e-ld.mp4">
                    <img src="http://dy-allimage.oss-cn-hangzhou.aliyuncs.com/uploads/20190904/b531ddcd745bc57e3fcc8dd370607a67.jpg">
                </a>
            </div>
            <div class="item item-p">
                <p>Ai修图<br>使用指南</p>
                <a class="pic" href="javascript:void(0)" data-src="http://bf.allimage.cn/663d274d756a43e2a5af097b41b5012f/f5ca7de960fa4d70a71fc44e50c892de-8f24516d3d243233032ac12d29f17a25-ld.mp4">
                    <img src="http://dy-allimage.oss-cn-hangzhou.aliyuncs.com/uploads/20190903/91deff83e6ed5a4dbe8e8b518a0a89e7.jpg">
                </a>
            </div>
            <div class="item item-p">
                <p>修图兑换券<br>使用指南</p>
                <a class="pic" href="javascript:void(0)" data-src="http://bf.allimage.cn/0bf782b28e2c4729b5c962165e85e1a1/ce1ce312cbb24c7781e78f0a025e990e-93372f86f5433683d5c2c18a1dffec93-ld.mp4">
                    <img src="http://dy-allimage.oss-cn-hangzhou.aliyuncs.com/uploads/20190906/3dfd831d885d6e499d3ce0334058f310.jpg">
                </a>
            </div>
            <div class="item">
                <a href="http://app.hgzxjy.com.cn/cms/a/53" target="_blank">更多视频&gt;&gt;</a>
            </div>
        </div>
    </li>
</ul>
<div class="iframe-wrap" style="display: none;">
    <iframe id="iframe-video" src="/web/ps/video" frameborder="0"></iframe>
    <a class="close" href="javascript:void(0)"></a>
</div>
<script src="/static/web/res/layui/layui.js"></script>
<script>
    var $url = "http://www.pai2345.com";
    layui.use(['element', 'form', 'layer'], function () {
        var element = layui.element,
            layer = layui.layer,
            form = layui.form;
        //充值弹出层
        $('.my-money-coin').on('click', function () {
            layer.open({
                skin: 'dialog-recharge',
                type: 2,
                title: '充值',
                content: ['/web/recharge.html', 'no']
            });
        });

    });
    function _recharge(){
        layer.open({
            skin: 'dialog-recharge',
            type: 2,
            title: '充值',
            content: ['/web/recharge.html', 'no']
        });
    }
    var layerFeedback = '';

    function feedback() {
        layerFeedback = layer.open({
            type: 1,
            //skin: 'layui-layer-rim', //加上边框
            area: ['720px', '540px'], //宽高
            title: '有问题啦？千千帮你解决',
            content: $('.all_wial')
        });
    }

    function submitFeedback() {
        var email = $('.all_wial_email').val();
        var contact = $('.all_wial_contact').val();
        var content = $('.all_wial_content').val();
        if (email && content && contact) {
            $.post($url + '/api/changtour/User/webFeedback', {
                'email': email,
                'contact': contact,
                'content': content
            }, function (res) {
                if (res.code == 200) {
                    layer.msg(res.msg);
                    layer.close(layerFeedback);
                } else {
                    if (res.data && res.data.debug) {
                        layer.msg(res.data.debug)
                    } else {
                        layer.msg(res.msg)
                    }
                }
            })
        } else {
            layer.msg("信息需要填写完整");
        }

    }

    // 充值成功关闭弹出层
    function closeCoinLayui() {
        layer.msg("支付成功，请手动刷新页面", 0);
        setTimeout(function () {
            layer.closeAll();
        }, 2000);
    }

    $('.fixed-bar li').mouseover(function () {
        $(this).find('.subbox').show();
    }).mouseout(function () {
        $(this).find('.subbox').hide();
    });

    $('.fixed-bar .video .item-p').mouseover(function () {
        $('.fixed-bar .video .item').removeClass('on');
        $(this).addClass('on');
    });

    // $(window).scroll(function () {
    //     if ($(window).scrollTop() > 50) {
    //         $('.gotop').show();
    //     } else {
    //         $('.gotop').hide();
    //     }
    // });

    window.addEventListener('scroll', function () {
        if ($(window).scrollTop() > 50) {
            $('.gotop').show();
        } else {
            $('.gotop').hide();
        }
    });

    $('.gotop').on('click', function () {
        $('body,html').animate({
            scrollTop: 0
        }, 500);
    });
    //打开视频窗口
    $('.fixed-bar .video .pic').on('click',function(){
        var videoSrc = $(this).attr('data-src'),
            _video = $('#iframe-video').contents().find('#fixed-video');

        $('#iframe-video').contents().find('.hd>a').each(function(i, e){
            if($(e).data('src') ===  videoSrc){
                $(e).addClass('on');
            }else{
                $(e).removeClass('on');
            }
        });

        $(_video).attr('src',videoSrc);
        $('.iframe-wrap').show();
    });

    //关闭视频窗口
    $('.iframe-wrap .close').on('click',function(){
        var _video = $('#iframe-video').contents().find('#fixed-video');
        $(_video)[0].pause();
        $('.iframe-wrap').hide();
    })
</script>
<script src="/static/web/res/js/hmt.js" type="text/javascript"></script>
<script>
    layui.use(['element'], function () {
        var element = layui.element;
        ///web/ps/oneclick
    });
    $(document).ready(function () {

        var activeIndex = 1;

        //默认显示第一张
        $('.img-before').css({
            'background': 'url("/static/web/res/images/pscase_before' + activeIndex + '.jpg") no-repeat 0 0',
            'background-size': 'cover'
        });
        $('.img-after').css({
            'background': 'url("/static/web/res/images/pscase_after' + activeIndex + '.jpg") no-repeat 0 0',
            'background-size': 'cover'
        });

        //tab切换显示
        $('.layui-tab-title li').on('click', function (e) {
            var conIndex = $(this).index(),
                activeCon = $('.layui-tab-item').eq(conIndex);
            activeIndex = $(activeCon).find('.img-box-small img').eq(0).data('index');
            $('.img-before').css({
                'background': 'url("/static/web/res/images/pscase_before' + activeIndex + '.jpg") no-repeat 0 0',
                'background-size': 'cover'
            });
            $('.img-after').css({
                'background': 'url("/static/web/res/images/pscase_after' + activeIndex + '.jpg") no-repeat 0 0',
                'background-size': 'cover'
            });
        })

        //点击小图切换
        $('.img-box-small img').on('click', function (e) {
            activeIndex = $(this).data('index')
            $('.img-before').css({
                'background': 'url("/static/web/res/images/pscase_before' + activeIndex + '.jpg") no-repeat 0 0',
                'background-size': 'cover'
            });
            $('.img-after').css({
                'background': 'url("/static/web/res/images/pscase_after' + activeIndex + '.jpg") no-repeat 0 0',
                'background-size': 'cover'
            });
        })

        //对比
        $('.img-box-big').mousemove(function (e) {

            var left = $('.img-box-big').offset().left;

            // 计算出需要偏移的距离
            var offsetNO = e.pageX - left;

            // 默认原图最小显示100px，最大显示884px
            if (offsetNO < 100) {
                $('.img-before').width(100);
                $('.line').css('left', '100px');
            } else if (offsetNO > 884) {
                $('.img-before').width(884);
                $('.line').css('left', '884px');
            } else {
                $('.img-before').width(offsetNO);
                $('.line').css('left', offsetNO + 'px');
            }

        });

    });
</script>
<!--修图券兑换-->
<div class="exch-ticket" id="exch-ticket1" style="display: none;">
    <div>请输入您的修图券兑换码</div>
    <input class="ipt" type="text" name="code" placeholder="请输入16位兑换码" maxlength="16">
    <div class="btn-wrap">
        <a class="btn" href="javascript:void(0)">立即兑换</a>
    </div>
</div>
<div class="exch-ticket" id="exch-ticket2" style="display: none;">
    <div>成功兑换修图券</div>
    <div class="price price-coin price-ticket">
        <i></i>
        <span class="o">5</span>张
    </div>
    <div class="btn-wrap">
        <a class="btn-w" href="javascript:void(0);" onclick="layer.closeAll();window.location.reload();;">返回</a>
        <a class="btn" href="/web/ps/ai">立即修图</a>
    </div>
</div>
<div class="exch-ticket" id="exch-ticket3" style="display: none;">
    <div class="icon-failure"><img src="/static/web/res/images/vip/icon-failure.png"></div>
    <div style="margin: 20px 0;" class="msg">兑换修图券失败，请重新核对兑换码</div>
    <div class="btn-wrap">
        <a class="btn-w" href="javascript:void(0);" onclick="layer.closeAll();window.location.reload();">返回</a>
        <a class="btn" href="/web/ps/ai">立即修图</a>
    </div>
</div>
<script>
    //修图券兑换
    $(document).on('click', '.btn-exch', function () {
        layer.open({
            skin: 'dialog-tips',
            title: '修图券兑换',
            type: 1,
            content: $('#exch-ticket1'),
        });
    });
    $(document).on('click', '#exch-ticket1 .btn', function () {
        /*layer.closeAll();
        menuTips2();*/
        var code = $(this).parent().prev("input[name='code']").val();
        if (code.length != 16) {
            layer.msg('请输入16位兑换码')
            return false
        }
        $.ajax({
            url: '/api/ps/combo/redeem_code',
            type: 'post',
            data: {code: code},
            dataTyep: 'json',
            success: function (e) {
                if (e.status == 'error') {
                    layer.closeAll();
                    $('#exch-ticket3 .msg').text('兑换修图券失败,' + e.msg);
                    exchF();
                    return false;
                } else {
                    layer.closeAll();
                    $('#exch-ticket2 .o').text(e.data.number);
                    exchS()
                    return false;
                }
            },
            error: function(){
                layer.msg('请先登录后再兑换修图券');
            }
        })
    });

    //兑换成功
    function exchS() {
        layer.open({
            skin: 'dialog-tips',
            title: '修图券兑换',
            type: 1,
            content: $('#exch-ticket2'),
        });
    };

    //兑换失败
    function exchF() {
        layer.open({
            skin: 'dialog-tips',
            title: '修图券兑换',
            type: 1,
            content: $('#exch-ticket3'),
        });
    };
</script>
</body>
</html>
